---
title: clsOutcomeManager.CloseCase
summary: Close the current legal case and create its close-task side effects.
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
operation_id: close-legal-case
trigger: Outcome workflow closes the current case.
---

# clsOutcomeManager.CloseCase

Close the current legal case and create its close-task side effects.

| Field | Value |
| --- | --- |
| **Operation ID** | close-legal-case |
| **Trigger** | Outcome workflow closes the current case. |
| **Inputs** | Current manager state, current claim/case context, and workflow-specific parameters or collections. |
| **Outputs** | Updated collections, messages, or side effects specific to the operation. |
| **Primary components** | `clsOutcomeManager.CloseCase` |
| **Entry point** | `SAIF.Application.Claim.Legal\LegalNet\clsOutcomeManager.vb` |

## Steps

1. Add a `RECRD` file-location entry to the current case.
2. Create the standard `CASECLOSED` task.
3. When `HasVocIssues` is true and `VocMailID.Trim.Length > 5`, create the `CASECLOSEDVOC` task instead/additionally.
4. Set `CaseStatusCode = "CLOSE"` and save the updated case.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
  Start([Trigger]) --> S1[Load current state]
  S1 --> S2[Apply workflow rules]
  S2 --> D{"Validation or security<br>issue?"}
  D -->|Yes| EndErr(["Return message or block<br>action"])
  D -->|No| EndOk(["Return updated workflow<br>state"])
```

## Failure and edge-case behavior
- The vocational close task is skipped when the case lacks voc issues or a usable `VocMailID`.

## Related documentation
- [Index](../index.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Security and authorization](../security-authorization.md)
- [Database tables](../database-tables.md)
- [SQL catalog](../sql/index.md)
- [Procedures](../procedures/index.md)
- [API reference](../api/index.md)

## Sources
- SAIF.Application.Claim.Legal\LegalNet\clsOutcomeManager.vb
